<form id="editBlock">
    <input type="text" size="64" name="title" value="<?php echo $TITLE; ?>" /><br/>
    <textarea rows="20" cols="50" name="setting"><?php echo $SETTING; ?></textarea><br/>
    <input type="button" value="Edit" id="submit" />
</form>

<script type="text/javascript">
    $("#submit").bind("click",function(){
        $.post("ajax/editBlock/<?php echo $ID; ?>/",
        $("#editBlock").serialize(),
        function(){
            $('#dialog').dialog('close');
            $("#block-<?php echo $ID; ?>").remove();
            makeBlock(<?php echo $ID; ?>);
        });
    });
</script>
